package day05;

public class Test3 {
    public static void main(String[] args) {
        //新建两个Point对象
        //内存地址分别保存变量p1和p2
        Point p1 = new Point();
        Point p2 = new Point();
        //为p1,p2的x,y赋值
        p1.x = 3;
        p1.y = 4;

        p2.x = 6;
        p2.y = 8;
        //分别调用两个对象的distance()和toString()方法，并打印方法的返回值

        System.out.println("p1的坐标:"+p1.toString());
        System.out.println("p1的长度:"+p1.distance());
        System.out.println("p2的坐标:"+p2.toString());
        System.out.println("p2的长度:"+p2.distance());





    }
}
